package com.jk.admin.dao;

import com.jk.admin.entity.Product;
import com.jk.admin.entity.Shoptype;
import com.jk.admin.entity.TypeEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.elasticsearch.repository.ElasticsearchCrudRepository;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface ProductDao {

    List<Product> getListPro(Product product);

    void delPro(Integer id);

    void addPro(Product product);

    void updPro(Product product);

    Product huiPro(Integer id);

    @Select("select * from t_product")
    HashMap<String,Product> getecharts();


    @Select("select * from t_product")
    List<Product> getListPros();

    @Insert("insert into t_shop_type values(#{id},#{s_name},#{s_img}," +
            "#{s_type},#{s_color}," +
            "#{sid},#{product_price},#{product_description})")
    void addType(Shoptype shoptype);
}
